﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRAdminUI/AdminMaster.Master" AutoEventWireup="true" CodeBehind="AddEmployeeContacts.aspx.cs" Inherits="HRM.UI.HRAdminUI.EmpModule.AddEmployeeContacts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Employee/EmployeeContactCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">

        function CheckValidation() {
            if (document.getElementById("<%=txtEmpCode.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Employee Code !";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEmpCode.ClientID%>").focus();
                return false;
            }


            if (document.getElementById("<%=txtFirstcontact.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter First Contact !";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtFirstcontact.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtPresentAddress.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Present Address !";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtPresentAddress.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtPermanentAddress.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Permanent Address !";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtPermanentAddress.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtEmergencyNumber.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Emergency Number!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEmergencyNumber.ClientID%>").focus();
                return false;
            }

            return true;

        }

        function btnNext_onclick() {

            $('#btnNext').click(function () {
                document.location.href = "AddEmployeePhoto.aspx";
            });
        }

    </script>
    <fieldset>
        <legend>Contact Info</legend>
        <div align="center">
            <asp:Label runat="server" ID="msgLabel" CssClass="msgTxt"></asp:Label></div>
        <table class="ContactInfoTB">
            <tr>
                <td class="Label">
                    <asp:Label ID="Label1" runat="server">Employee Code</asp:Label>
                </td>
                <td class="Field">
                    <%-- <asp:Label runat="server" ID="MsgEmpCode" CssClass="CodeMsg" Text="Faruqe-1001"></asp:Label>--%>
                    <p id="employeeCode" runat="server" class="CodeMsg">
                    </p>
                </td>
            </tr>
            <tr id="textboxCode" runat="server">
                <td class="Label">
                    Employee Code
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmpCode" class="textboxinput" /><span class="estaricStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    First Contact
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtFirstcontact" class="textboxinput" /><span
                        class="estaricStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Second Contact
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtSecondContact" class="textboxinput" />
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Emergency Contact Person
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmergencyperson" class="textboxinput" />
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Emergency Contact Number
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmergencyNumber" class="textboxinput" /><span
                        class="estaricStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Present Address
                </td>
                <td class="Field">
                    <textarea runat="server" id="txtPresentAddress" cols="14" rows="2" class="inputTextarea"></textarea><span
                        class="estaricStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Permanent Address
                </td>
                <td class="Field">
                    <textarea runat="server" id="txtPermanentAddress" cols="14" rows="2" class="inputTextarea"></textarea><span
                        class="estaricStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    
                </td>
                <td class="Field">
                    <input id="btnSave" type="submit" runat="server" value="Save" class="btnCss" onclick="return CheckValidation()"
                        onserverclick="SaveContact" />
                    <input id="btnNext" type="submit" runat="server" value="Next &gt;&gt;" onclick="return btnNext_onclick()" class="btnCss"/>
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
